package com.cykj.pos.service.impl;

import com.cykj.common.core.domain.AjaxResult;
import com.cykj.pos.domain.CustomerCashBackTemp;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.cykj.pos.mapper.UnFailureActiveTemplateMapper;
import com.cykj.pos.domain.UnFailureActiveTemplate;
import com.cykj.pos.service.IUnFailureActiveTemplateService;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 未/伪激活模板Service业务层处理
 *
 * @author weijianbo
 * @date 2025-03-18
 */
@Service
public class UnFailureActiveTemplateServiceImpl extends ServiceImpl<UnFailureActiveTemplateMapper, UnFailureActiveTemplate> implements IUnFailureActiveTemplateService {

    @Resource
    private UnFailureActiveTemplateMapper unFailureActiveTemplateMapper;

    @Override
    public List<UnFailureActiveTemplate> queryList(UnFailureActiveTemplate unFailureActiveTemplate) {
        LambdaQueryWrapper<UnFailureActiveTemplate> lqw = Wrappers.lambdaQuery();
        return this.list(lqw);
    }

    @Override
    public AjaxResult unActiveList() {
        AjaxResult ajaxResult = AjaxResult.success();
        List<UnFailureActiveTemplate> list = unFailureActiveTemplateMapper.unActiveList();
        ajaxResult.put("list",list);
        return ajaxResult;
    }

    @Override
    public AjaxResult faActiveList() {
        AjaxResult ajaxResult = AjaxResult.success();
        List<UnFailureActiveTemplate> list = unFailureActiveTemplateMapper.faActiveList();
        ajaxResult.put("list",list);
        return ajaxResult;
    }

    @Override
    public AjaxResult customerCashBackList() {
        AjaxResult ajaxResult = AjaxResult.success();
        List<CustomerCashBackTemp> list = unFailureActiveTemplateMapper.customerCashBackList();
        ajaxResult.put("list",list);
        return ajaxResult;
    }
}
